package com.example.sandbox.dto.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 账户/余额表
 *
 * @author liuxinxin
 * @since 2024-05-10
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("fs_account_balance")
@ApiModel(value = "AccountBalance对象")
public class AccountBalance extends Model<AccountBalance> {
    private static final long serialVersionUID = 1L;

    public static final LambdaQueryWrapper<AccountBalance> gw() {
        return new LambdaQueryWrapper<>();
    }

    @ApiModelProperty("Id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    @ApiModelProperty(value = "更新时间")
    private Date updatedAt;

    @ApiModelProperty("创建者用户id")
    private Long createBy;

    @ApiModelProperty("更新者用户id")
    private Long modifiedBy;

    @ApiModelProperty("商户或代理商编码")
    private String mchNo;

    @ApiModelProperty("商户名称")
    private String mchName;

    @ApiModelProperty("类型:1-商户 2-代理商 3-平台")
    private Byte mchType;

    @ApiModelProperty("账户金额类型 1-账户余额 2-代付余额 3-保证金")
    private Byte accountType;

    @ApiModelProperty("金额 单位:分，币种最小单位")
    private Long amount;

    @ApiModelProperty("不可用金额 单位:分（业务中间状态时产生的金额）")
    private Long unAmount;

    @ApiModelProperty("平台冻结金额 单位:分")
    private Long frozenAmount;

    @ApiModelProperty("可提现金额 单位:分")
    private Long settAmount;

    @ApiModelProperty("针对Amount字段的累计增加金额（用于统计，仅支持累加操作，不支持扣减修改） 单位:分")
    private Long totalAddAmount;

    @ApiModelProperty("针对Amount字段的累计减少金额（用于统计，仅支持累加操作，不支持扣减修改） 单位:分")
    private Long totalSubAmount;

    @ApiModelProperty("账户状态,1-可用,0-停止使用")
    private Byte accountStatus;

    @ApiModelProperty("数据安全保护秘钥 & 数据版本号")
    private String safeKey;

    @ApiModelProperty("商户备注")
    private String remark;

    @ApiModelProperty("三位币种")
    private String currency;

    @ApiModelProperty("钱包代码")
    private String walletCode;

}
